package com.dd.machine.base.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by wbb on 2016/5/16.
 */
public class AppUpdate implements Parcelable {
    /**
     * note : 更新内容2
     * os : android
     * createTime : 1462933421000
     * online : true
     * updateTime : 1462934668000
     * id : 2
     * buildNo : 2
     * version : 2.0.2
     * url : http://www.icity.com/app/asd2.apk

     */
    private String note;
    private String os;
    private String createTime;
    private boolean online;
    private String updateTime;
    private int id;
    private String buildNo;
    private String version;
    private String url;

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBuildNo() {
        return buildNo;
    }

    public void setBuildNo(String buildNo) {
        this.buildNo = buildNo;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.note);
        dest.writeString(this.os);
        dest.writeString(this.createTime);
        dest.writeByte(this.online ? (byte) 1 : (byte) 0);
        dest.writeString(this.updateTime);
        dest.writeInt(this.id);
        dest.writeString(this.buildNo);
        dest.writeString(this.version);
        dest.writeString(this.url);
    }

    public AppUpdate() {}

    protected AppUpdate(Parcel in) {
        this.note = in.readString();
        this.os = in.readString();
        this.createTime = in.readString();
        this.online = in.readByte() != 0;
        this.updateTime = in.readString();
        this.id = in.readInt();
        this.buildNo = in.readString();
        this.version = in.readString();
        this.url = in.readString();
    }

    public static final Parcelable.Creator<AppUpdate> CREATOR = new Parcelable.Creator<AppUpdate>() {
        @Override
        public AppUpdate createFromParcel(Parcel source) {return new AppUpdate(source);}

        @Override
        public AppUpdate[] newArray(int size) {return new AppUpdate[size];}
    };
}
